# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         test02
# Description:
# Author:       98745
# Date:         2019/4/6
#-------------------------------------------------------------------------------

from bs4 import *
import re
html='''
<html>
    <head><title>html5lib测试</title></head>
    <body>
       <span class="pl">出版年:</span> 2014-5<br/>
       
       
       
       <span class="pl">页数:</span> 291<br/>
        <span class="pl">定价:</span> 39.50元<br/>
        
        
        
        <span class="pl">装帧:</span> 精装<br/>
    </body>
</html>
'''
soup=BeautifulSoup(html,'lxml')
soup_body=soup.find('body')
result=re.subn('\n','---',soup_body.text)
print(result)
# print(len('我'))